import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    // 这里开始的路径是有用的
    {
      path: '/',
      name: 'Login',
      component: () => import('./views/Login')
    },
    {
      path: '/admin/adminMemu',
      name: 'adminMemu',
      component: () => import('./views/admin/adminMemu')
    },
    {
      path: '/admin/addUser',
      name: 'addUser',
      component: () => import('./views/admin/addUser')
    },
    {
      path: '/admin/manageUser',
      name: 'manageUser',
      component: () => import('./views/admin/manageUser')
    },
    {
      path: '/admin/addStore',
      name: 'addStore',
      component: () => import('./views/admin/addStore')
    },
    {
      path: '/admin/manageStore',
      name: 'manageStore',
      component: () => import('./views/admin/manageStore')
    },
    {
      path: '/admin/addWarehouse',
      name: 'addWarehouse',
      component: () => import('./views/admin/addWarehouse')
    },
    {
      path: '/admin/manageWarehouse',
      name: 'manageWarehouse',
      component: () => import('./views/admin/manageWarehouse')
    },
    {
      path: '/admin/addFactory',
      name: 'addFactory',
      component: () => import('./views/admin/addFactory')
    },
    {
      path: '/admin/manageFactory',
      name: 'manageFactory',
      component: () => import('./views/admin/manageFactory')
    },
    {
      path: '/admin/addCustomerService',
      name: 'addCustomerService',
      component: () => import('./views/admin/addCustomerService')
    },
    {
      path: '/admin/manageCustomerService',
      name: 'manageCustomerService',
      component: () => import('./views/admin/manageCustomerService')
    },
    // {
    //   path: '/admin/management',
    //   name: 'admin',
    //   component: () => import('./views/admin/UserManagement')
    // },
    {
      path: '/shopOwner/index',
      name: 'ShopOwnerIndex',
      component: () => import('./views/shopowner/Index')
    },
    {
      path: '/shopOwner/ShelfAddedApply',
      name: 'ShelfAddedApply',
      component: () => import('./views/shopowner/ShelfAddedApply')
    },
    {
      path: '/shopOwner/ShelfDown',
      name: 'ShelfDown',
      component: () => import('./views/shopowner/ShelfDown')
    },
    {
      path: '/SalesPerson/BeforeSales',
      name: 'BeforeSales',
      component: () => import('./views/salesperson/BeforeSales')
    },
    {
      path: '/SalesPerson/SalesInformation',
      name: 'SalesInformation',
      component: () => import('./views/salesperson/SalesInformation')
    },
    {
      path: '/SalesPerson/RecordAfterSaleCenter',
      name: 'RecordAfterSaleCenter',
      component: () => import('./views/salesperson/RecordAfterSaleCenter')
    },
    // lin
    {
      path: '/aftersales/ExchangeGoods',
      name: 'ExchangeGoods',
      component: () => import('./views/aftersales/ExchangeGoods')
    },
    {
      path: '/aftersales/ApplyForADelayInDelivery',
      name: 'ApplyForADelayInDelivery',
      component: () => import('./views/aftersales/ApplyForaDelayInDelivery')
    },
    {
      path: '/aftersales/FinishADelayInDelivery',
      name: 'FinishADelayInDelivery',
      component: () => import('./views/aftersales/FinishADelayInDelivery')
    },
    {
      path: '/aftersales/CheckADelayInDelivery',
      name: 'CheckADelayInDelivery',
      component: () => import('./views/aftersales/CheckADelayInDelivery')
    },
    {
      path: '/aftersales/SalesReturn',
      name: 'SalesReturn',
      component: () => import('./views/aftersales/SalesReturn')
    },
    {
      path: '/SalesPerson/index',
      name: 'SalesPersonIndex',
      component: () => import('./views/salesperson/Index')
    },
    {
      path: '/aftersales/RepairTheMachine',
      name: 'RepairTheMachine',
      component: () => import('./views/aftersales/RepairTheMachine')
    },
    // 以下是apirla的路径
    {
      path: '/order/create',
      name: 'CreateOrder',
      component: () => import('./views/order/Order')
    },
    {
      path: '/sell/dosell',
      name: 'Sell',
      component: () => import('./views/sell/Sell')
    },
    {
      path: '/warehouse/enter',
      name: 'EnterWare',
      component: () => import('./views/warehouseAdmin/EnterWare')
    },
    {
      path: '/warehouse/service',
      name: 'Service',
      component: () => import('./views/warehouseAdmin/Service')
    },
    {
      path: '/warehouse/pass',
      name: 'Pass',
      component: () => import('./views/warehouseAdmin/Pass')
    },
    {
      path: '/warehouse/index',
      name: 'WarehouseIndex',
      component: () => import('./views/warehouseAdmin/Index')
    }
  ]
})
